def get_grade(score):
    """
    根据分数返回对应的等级
    A: 90-100
    B: 80-89
    C: 70-79
    D: 60-69
    E: 0-59
    """
    if score >= 90 and score <= 100:
        return "A"
    elif score >= 80 and score < 90:
        return "B"
    elif score >= 70 and score < 80:
        return "C"
    elif score >= 60 and score < 70:
        return "D"
    elif score >= 0 and score < 60:
        return "E"
    else:
        return "无效分数"

def main():
    print("成绩等级评定系统")
    print("=" * 20)
    
    try:
        score = float(input("请输入成绩（0-100）："))
        
        if score < 0 or score > 100:
            print("输入错误！成绩必须在0-100之间")
            return
        
        grade = get_grade(score)
        print(f"\n您的成绩：{score}")
        print(f"对应的等级：{grade}")
        
        # 显示等级说明
        print("\n等级说明：")
        print("A: 优秀 (90-100)")
        print("B: 良好 (80-89)") 
        print("C: 中等 (70-79)")
        print("D: 及格 (60-69)")
        print("E: 不及格 (0-59)")
        
    except ValueError:
        print("输入错误！请输入有效的数字")

if __name__ == "__main__":
    main()